<?php
class BlogViewModel extends ViewModel{
    Protected $viewFields=array(
       'blog'=>array('id','title','click','time','summary','_type'=>'LEFT'),
       'cate'=>array('name','sort','_on'=>'blog.cid=cate.id')
    	);
    
   public function getAll($where,$limit){

    return 	$this->where($where)->limit($limit)->order("time DESC")->select();
   }
}



?>